package org.example.erpapiservicespringmongoimpl.doc;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.List;

@Document(collection = "category")
public class CategoryDoc {
    @Id
    protected String id;

    protected String name;
    protected Integer level;
    protected List<CategoryDoc> children=new ArrayList<>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public List<CategoryDoc> getChildren() {
        return children;
    }

    public void setChildren(List<CategoryDoc> children) {
        this.children = children;
    }
}
